import { createApp } from 'vue'
import App from './App.vue'
import Hello from './Hello.vue'

const app = createApp(App)

app.component("Hello", Hello)
app.config.globalProperties.x = "生死看淡 不服就干"

declare module "vue" {
  interface ComponentCustomProperties {
    x: string
  }
}

app.directive("beauty", (elememt, { value }) => {
  elememt.innerText += value
  elememt.style.color = "green"
  elememt.style.backgroundColor = "yellow"
})

// setTimeout(() => {
//   app.unmount()
// }, 2000)
// 挂载应用
app.mount('#app')